<?php include ("inc/check_authen/check_authen.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="stylesheet" href="admin_css/template_admin.css" type="text/css" />
 <link rel="stylesheet" href="admin_css/product.css" type="text/css" />
 <script type="text/javascript" src="js/page_function/mainCategory.js"></script>	

<title>Admin Page | สินค้าหลัก</title>
</head>

<body>
<div class="container">
	<?php include("inc/layout/header/header.php");?>
    <?php include("inc/layout/navigator/navigator.php");?>
  	<div class="content">
  
  	<div id="product_catMain">
  		<div class="button_topic">ประเภทสินค้าหลัก </div> 
  			<br/>
  			<br/>
  			
  		
  		<table border="0" class="tb1">
  			<tr>
  				<td>เพิ่มประเภทสินค้า </td>
  				<td><input type="text" id="mainCategory_txtMain" style="width:300px;"/></td>
  				<td>
  					<div id="tableAdd">	
  						<a href="#" onclick="addMainCategory(null)"><img src="images/symbol/add_button.png" alt="" class="addBtn" /></a>
  					</div>
  					<div id="tableEdit" style="display:none;">
  						<a href="#" onclick="editMainCategory()"><img src="images/symbol/edit_button.png" alt="" class="addBtn" /></a> 
  						<a href="#" onclick="backToAdd()" ><img src="images/symbol/cancel_button.png" alt="" /></a>
  					</div>
  				</td>
  			</tr>
  		
  		</table>
  		 <table id="box-table-a">
			  <thead>
			    	<tr>
			            <th scope="col">ID ประเภทสินค้าหลัก</th>
			            <th scope="col">ชื่อประเภทสินค้าหลัก</th>
			            <th scope="col">แก้ไข</th>
			            <th scope="col">ลบ</th>
			 
			        </tr>
			    </thead>
			    <tbody>
			    	<?php include("command/rawdata/getMainCategoryForEdit.php");?> 			    	
    			</tbody>
		</table>   
   	</div>   
    <!--end admin_index-->
   </div>
	<!-- end .content --> 
	<?php include("inc/layout/footer/footer.php");?>
</div>
 <!-- end .container -->
 <form action="command/rawdata/updateMainCategory.php" name="formSubmit" method="post">
	<input type="hidden" id="mainCategory_id" name="mainCategory_id" value=""></input>
	<input type="hidden" id="mainCategory_main" name="mainCategory_main" value=""></input>
 </form>
</body>
</html>